package cate.common.table.d;


import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("属性")
public class GDAttr {

    @NoteField("空")
    public static final int NULL = -1;

    @NoteField("当前生命")
    public static final int HP_CUR = 0;

    @NoteField("生命")
    public static final int HP = 1;

    @NoteField("攻击")
    public static final int ATT = 2;

    @NoteField("防御")
    public static final int DEF = 3;

    @NoteField("攻击附加(万分比值)")
    public static final int ATT_AR = 4;

    @NoteField("防御附加(万分比值)")
    public static final int DEF_AR = 5;

    @NoteField("生命附加(万分比值)")
    public static final int HP_AR = 6;

    @NoteField("速度附加(万分比值)")
    public static final int SPEED_AR = 7;

    @NoteField("速度")
    public static final int SPEED = 8;

    @NoteField(value = "抗控",detail = "控制率对立属性（万分比值")
    public static final int CTRL_ANTI = 9;

    @NoteField(value = "命中",detail = "命中率(万分比值)")
    public static final int HIT = 10;

    @NoteField(value = "闪避",detail = "闪避率(万分比值)")
    public static final int MISS = 11;

    @NoteField(value = "暴击",detail = "暴击率（万分比值")
    public static final int STRIKE = 12;

    @NoteField(value = "抗暴",detail = "暴击率对立属性（万分比值")
    public static final int STRIKE_ANTI = 13;

    @NoteField(value = "暴伤加成", detail = "食灵使用技能造成暴击时，伤害将依据此倍率放大，默认和下限倍率均为1.2倍，受目标【爆伤减免】的关联影响")
    public static final int STRIKE_ATT = 14;

    @NoteField(value = "暴伤减免", detail = "暴击伤害对立属性（万分比值）")
    public static final int STRIKE_ATT_ANTI = 15;

    @NoteField(value = "治疗暴击",detail = "食灵使用治疗技能时判断治疗量是否暴击，暴击倍率为1.3")
    public static final int HEAL_STRIKE = 16;

    @NoteField(value = "治疗加成",detail = "")
    public static final int HEAL_UP = 17;

    @NoteField(value = "受疗抑制")
    public static final int HEALED_DOWN = 18;

    @NoteField(value = "物伤强化",detail = "物理伤害加深（万分比值）")
    public static final int DAMAGE_ADD_PHY = 19;

    @NoteField(value = "法伤强化",detail = "魔法伤害加深（万分比值")
    public static final int DAMAGE_ADD_MAGIC = 20;

    @NoteField(value = "物伤削弱",detail = "物理伤害减免（万分比值")
    public static final int HURT_IGN_PHY = 21;

    @NoteField(value = "法伤削弱",detail = "魔法伤害减免（万分比值")
    public static final int HURT_IGN_MAGIC = 22;

    @NoteField(value = "伤害加深",detail = "伤害加深（万分比值）")
    public static final int DAMAGE_ADD = 23;

    @NoteField(value = "伤害减少",detail = "伤害减免（万分比值")
    public static final int HURT_IGN = 24;

    @NoteField(value = "穿透",detail = "无视目标防御比率（万分比值）")
    public static final int PENETRATE = 25;

    @NoteField(value = "穿透抵抗",detail = "")
    public static final int PENETRATE_DEF = 26;

    @NoteField(value = "格挡几率",detail = "食灵受击时，有概率触发格挡并减免本次受到的伤害，本属性可提升触发格挡的概率，与【格挡干扰】互为对冲属性")
    public static final int PARRY_RATE = 27;

    @NoteField(value = "格挡干扰")
    public static final int PARRY_INTERFERENCE = 28;

    @NoteField(value = "格挡豁免")
    public static final int PARRY_DAMAGE_REDUCE = 29;

    @NoteField(value = "神圣伤害",detail = "增加食灵的输出伤害，与【邪恶保护】互为对冲属性")
    public static final int HOLY_DAMAGE = 30;

    @NoteField(value = "邪恶保护",detail = "降低食灵受到的伤害，与【神圣伤害】互为对冲属性")
    public static final int HOLY_DAMAGE_DEF = 31;

    @NoteField(value = "pvp对人加伤")
    public static final int PVP_UP = 32;

    @NoteField(value = "pvp对人减伤")
    public static final int PVP_DOWN = 33;

    @NoteField(value = "pve对怪加伤")
    public static final int PVE_UP = 34;

    @NoteField(value = "pve对怪减伤")
    public static final int PVE_DOWN = 35;

    @NoteField("对战士伤害提升")
    public static final int DAMAGE_ADD_J1 = 36;

    @NoteField("对法师伤害提升")
    public static final int DAMAGE_ADD_J2 = 37;

    @NoteField("对坦克伤害提升")
    public static final int DAMAGE_ADD_J3 = 38;

    @NoteField("对辅助伤害提升")
    public static final int DAMAGE_ADD_J4 = 39;

    @NoteField(value = "控制",detail = "控制率（万分比值）")
    public static final int CTRL = 40;

    @NoteField(value = "吸血值",detail = "食灵使用技能造成伤害时，为自身恢复该固定值的生命值")
    public static final int SUCK_VAL = 41;

    @NoteField("对战士免伤")
    public static final int HURT_IGN_J1 = 43;

    @NoteField("对法师免伤")
    public static final int HURT_IGN_J2 = 44;

    @NoteField("对坦克免伤")
    public static final int HURT_IGN_J3 = 45;

    @NoteField("对辅助免伤")
    public static final int HURT_IGN_J4 = 46;

    @NoteField("物理吸血(万分比值)")
    public static final int SUCK_PHY = 47;

    @NoteField("法术吸血(万分比值)")
    public static final int SUCK_MAGIC = 48;

    @NoteField(value = "灵能攻击",detail = "食灵触发灵能伤害时，提升造成的伤害，与【灵能防御】为对冲属性")
    public static final int PSY_ATT = 51;

    @NoteField(value = "灵能防御",detail = "食灵受到灵能伤害时，降低受到的伤害，与【灵能攻击】为对冲属性")
    public static final int PSY_DEF = 52;

    @NoteField(value = "灵能能量",detail = "加速食灵进入灵能模式 废弃了不用了")
    @Deprecated
    public static final int PSY_ENG = 53;

    @NoteField(value = "灵能强化",detail = "提升灵能造成灵能伤害的倍率，与【灵能抵抗】为对冲属性")
    public static final int PSY_UP = 54;

    @NoteField(value = "灵能抵抗",detail = "降低受到灵能伤害的倍率，与【灵能强化】为对冲属性")
    public static final int PSY_RES = 55;

    @NoteField("对水系加伤(万分比值)")
    public static final int DAMAGE_ADD_C1 = 57;
    @NoteField("对火系加伤(万分比值)")
    public static final int DAMAGE_ADD_C2 = 56;
    @NoteField("对木系加伤(万分比值)")
    public static final int DAMAGE_ADD_C3 = 58;
    @NoteField("对土系加伤(万分比值)")
    public static final int DAMAGE_ADD_C4 = 59;
    @NoteField("对光系加伤(万分比值)")
    public static final int DAMAGE_ADD_C5 = 61;
    @NoteField("对暗系加伤(万分比值)")
    public static final int DAMAGE_ADD_C6 = 60;

    @NoteField("灵能攻击加成")
    public static final int PSY_ATT_AR = 62;
    @NoteField("灵能防御加成")
    public static final int PSY_DEF_AR = 63;

    @NoteField("对水系免伤(万分比值)")
    public static final int HURT_IGN_C1 = 65;
    @NoteField("对火系免伤(万分比值)")
    public static final int HURT_IGN_C2 = 64;
    @NoteField("对木系免伤(万分比值)")
    public static final int HURT_IGN_C3 = 66;
    @NoteField("对土系免伤(万分比值)")
    public static final int HURT_IGN_C4 = 67;
    @NoteField("对光系免伤(万分比值)")
    public static final int HURT_IGN_C5 = 69;
    @NoteField("对暗系免伤(万分比值)")
    public static final int HURT_IGN_C6 = 68;


    @NoteField(value = "最终增伤", detail = "用于pvp天命系统中的增伤，与【最终减伤】为对冲属性")
    public static final int PVP_FINAL_DAMAGE_ADD = 71;

    @NoteField(value = "最终减伤", detail = "用于pvp天命系统中的减伤，与【最终增伤】为对冲属性")
    public static final int PVP_FINAL_HURT_IGN = 72;

    @NoteField("水攻")
    public static final int ELEMENT_C1_ATT = 74;
    @NoteField("火攻")
    public static final int ELEMENT_C2_ATT = 73;
    @NoteField("木攻")
    public static final int ELEMENT_C3_ATT = 75;
    @NoteField("土攻")
    public static final int ELEMENT_C4_ATT = 76;
    @NoteField("光攻")
    public static final int ELEMENT_C5_ATT = 78;
    @NoteField("暗攻")
    public static final int ELEMENT_C6_ATT = 77;


    @NoteField("水防")
    public static final int ELEMENT_C1_DEF = 80;
    @NoteField("火防")
    public static final int ELEMENT_C2_DEF = 79;
    @NoteField("木防")
    public static final int ELEMENT_C3_DEF = 81;
    @NoteField("土防")
    public static final int ELEMENT_C4_DEF = 82;
    @NoteField("光防")
    public static final int ELEMENT_C5_DEF = 84;
    @NoteField("暗防")
    public static final int ELEMENT_C6_DEF = 83;


    @NoteField("水攻加成")
    public static final int ELEMENT_C1_DAMAGE_ADD = 86;
    @NoteField("火攻加成")
    public static final int ELEMENT_C2_DAMAGE_ADD = 85;
    @NoteField("木攻加成")
    public static final int ELEMENT_C3_DAMAGE_ADD = 87;
    @NoteField("土攻加成")
    public static final int ELEMENT_C4_DAMAGE_ADD = 88;
    @NoteField("光攻加成")
    public static final int ELEMENT_C5_DAMAGE_ADD = 90;
    @NoteField("暗攻加成")
    public static final int ELEMENT_C6_DAMAGE_ADD = 89;

    @NoteField("水抗")
    public static final int ELEMENT_C1_IGN = 92;
    @NoteField("火抗")
    public static final int ELEMENT_C2_IGN = 91;
    @NoteField("木抗")
    public static final int ELEMENT_C3_IGN = 93;
    @NoteField("土抗")
    public static final int ELEMENT_C4_IGN = 94;
    @NoteField("光抗")
    public static final int ELEMENT_C5_IGN = 96;
    @NoteField("暗抗")
    public static final int ELEMENT_C6_IGN = 95;




    //以下为战斗中动态属性
    @NoteField(value = "剩余血量比例(万分比值)")
    public static final int V_HP_LEFT_RATE = 1001;

    @NoteField(value = "损失血量比例(万分比值)")
    public static final int V_HP_LOSS_RATE = 1002;

    @NoteField(value = "剩余血量", detail = "curHp")
    public static final int V_HP_LEFT = 1003;

    @NoteField(value = "已损失血量", detail = "(hp-curHp)")
    public static final int V_HP_LOSS = 1004;

    @NoteField("物连概率浮动(万分比值)")
    public static final int FLOAT_DOUBLE_ACT_PHY = 1010;

    @NoteField("法连概率浮动(万分比值)")
    public static final int FLOAT_DOUBLE_ACT_MAGIC = 1011;

    @NoteField("计算英雄升星时需要特殊处理的灵能属性")
    public static final int[] PSY_ATTR = {PSY_ATT,PSY_DEF,PSY_UP,PSY_RES};

    //获取对应的元素攻击
    public static byte getElementAtt(byte camp) {
        switch (camp) {
            case GDCamp.Type.C1:
                return ELEMENT_C1_ATT;
            case GDCamp.Type.C2:
                return ELEMENT_C2_ATT;
            case GDCamp.Type.C3:
                return ELEMENT_C3_ATT;
            case GDCamp.Type.C4:
                return ELEMENT_C4_ATT;
            case GDCamp.Type.C5:
                return ELEMENT_C5_ATT;
            case GDCamp.Type.C6:
                return ELEMENT_C6_ATT;
            default:
                return NULL;
        }
    }

    /** 获取键名 */
    public static String getKeyName(Integer k) {
        if (k == null) {
            return "null";
        }
        switch (k) {
            case NULL:
                return "空";
            case HP_CUR:
                return "当前生命";
            case ATT:
                return "攻击";
            case HP:
                return "生命";
            case DEF:
                return "防御";
            case SPEED:
                return "速度";
            case HIT:
                return "命中";
            case MISS:
                return "闪避";
            case STRIKE:
                return "暴击";
            case STRIKE_ANTI:
                return "抗暴";
            case STRIKE_ATT:
                return "暴伤";
            case STRIKE_ATT_ANTI:
                return "暴伤抗性";
            case HEAL_STRIKE:
                return "治疗暴击";
            case DAMAGE_ADD_PHY:
                return "物伤";
            case HURT_IGN_PHY:
                return "物免";
            case DAMAGE_ADD_MAGIC:
                return "法伤";
            case HURT_IGN_MAGIC:
                return "法免";
            case CTRL:
                return "控制";
            case CTRL_ANTI:
                return "抗控";
            case HEAL_UP:
                return "治疗加成";
            case HEALED_DOWN:
                return "受疗抑制";
            case DAMAGE_ADD:
                return "加伤";
            case HURT_IGN:
                return "免伤";
            case PENETRATE:
                return "穿透";
            case PENETRATE_DEF:
                return "穿透抵抗";
            case PARRY_RATE:
                return "格挡几率";
            case PARRY_INTERFERENCE:
                return "格挡干扰";
            case PARRY_DAMAGE_REDUCE:
                return "格挡豁免";
            case HOLY_DAMAGE:
                return "神圣伤害";
            case HOLY_DAMAGE_DEF:
                return "邪恶保护";
            case PVP_UP:
                return "pvp对人加伤";
            case PVP_DOWN:
                return "pvp对人减伤";
            case PVE_UP:
                return "pvp对怪加伤";
            case PVE_DOWN:
                return "pvp对怪减伤";
            case PSY_ATT:
                return "灵能攻击";
            case PSY_DEF:
                return "灵能防御";
            case PSY_ENG:
                return "灵能能量";
            case PSY_UP:
                return "灵能强化";
            case PSY_RES:
                return "灵能抵抗";
            case DAMAGE_ADD_C1:
                return "对水系增伤";
            case DAMAGE_ADD_C2:
                return "对火系增伤";
            case DAMAGE_ADD_C3:
                return "对木系加伤";
            case DAMAGE_ADD_C4:
                return "对土系加伤";
            case DAMAGE_ADD_C5:
                return "对光系加伤";
            case DAMAGE_ADD_C6:
                return "对暗系加伤";
            case PSY_ATT_AR:
                return "灵能攻击加成";
            case PSY_DEF_AR:
                return "灵能防御加成";
            case HURT_IGN_C1:
                return "对水系免伤";
            case HURT_IGN_C2:
                return "对火系免伤";
            case HURT_IGN_C3:
                return "对木系免伤";
            case HURT_IGN_C4:
                return "对土系免伤";
            case HURT_IGN_C5:
                return "对光系免伤";
            case HURT_IGN_C6:
                return "对暗系免伤";
            case PVP_FINAL_DAMAGE_ADD:
                return "最终增伤";
            case PVP_FINAL_HURT_IGN:
                return "最终减伤";
            case ELEMENT_C1_ATT:
                return "水攻";
            case ELEMENT_C2_ATT:
                return "火攻";
            case ELEMENT_C3_ATT:
                return "木攻";
            case ELEMENT_C4_ATT:
                return "土攻";
            case ELEMENT_C5_ATT:
                return "光攻";
            case ELEMENT_C6_ATT:
                return "暗攻";
            case ELEMENT_C1_DEF:
                return "水防";
            case ELEMENT_C2_DEF:
                return "火防";
            case ELEMENT_C3_DEF:
                return "木防";
            case ELEMENT_C4_DEF:
                return "土防";
            case ELEMENT_C5_DEF:
                return "光防";
            case ELEMENT_C6_DEF:
                return "暗防";
            case ELEMENT_C1_DAMAGE_ADD:
                return "水攻加成";
            case ELEMENT_C2_DAMAGE_ADD:
                return "火攻加成";
            case ELEMENT_C3_DAMAGE_ADD:
                return "木攻加成";
            case ELEMENT_C4_DAMAGE_ADD:
                return "土攻加成";
            case ELEMENT_C5_DAMAGE_ADD:
                return "光攻加成";
            case ELEMENT_C6_DAMAGE_ADD:
                return "暗攻加成";
            case ELEMENT_C1_IGN:
                return "水抗";
            case ELEMENT_C2_IGN:
                return "火抗";
            case ELEMENT_C3_IGN:
                return "木抗";
            case ELEMENT_C4_IGN:
                return "土抗";
            case ELEMENT_C5_IGN:
                return "光抗";
            case ELEMENT_C6_IGN:
                return "暗抗";
            case ATT_AR:
                return "攻击附加";
            case HP_AR:
                return "生命附加";
            case DEF_AR:
                return "防御附加";
            case SPEED_AR:
                return "速度附加";
            case SUCK_PHY:
                return "物理吸血";
            case SUCK_MAGIC:
                return "法术吸血";
            case SUCK_VAL:
                return "吸血值";
            case DAMAGE_ADD_J1:
                return "对战士加伤";
            case DAMAGE_ADD_J2:
                return "对法师加伤";
            case DAMAGE_ADD_J3:
                return "对坦克加伤";
            case DAMAGE_ADD_J4:
                return "对辅助加伤";
            case HURT_IGN_J1:
                return "对战士免伤";
            case HURT_IGN_J2:
                return "对法师免伤";
            case HURT_IGN_J3:
                return "对坦克免伤";
            case HURT_IGN_J4:
                return "对辅助免伤";
            case V_HP_LEFT_RATE:
                return "剩余血量比例";
            case V_HP_LOSS_RATE:
                return "已损失血量比例";
            default:
                return "未知属性" + k;
        }
    }
}
